import { request } from '../../../services/request';
import { AsnQueryParams, AsnResponse } from './types';

export const queryAsn = async (params: AsnQueryParams): Promise<AsnResponse> => {
    console.log('请求参数:', params);

    try {
        const response = await request('/app/wms/asn/queryAsn', {
            method: 'POST',
            body: JSON.stringify(params),
        });

        console.log('接口返回:', response);
        return response;
    } catch (error) {
        console.error('查询 ASN 失败:', error);
        throw error;
    }
};
